package com.lkl.client;

import com.lkl.bean.BaseResp;
import com.lkl.bean.OrderReq;
import com.lkl.bean.TgOrder;
import com.lkl.bean.TgOrderDetail;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @Author lkl
 * @Description
 * @Date 2022/3/28
 */
@FeignClient(name = "tg-order",path = "order")
public interface OrderClients {

    @RequestMapping("/cancelOrder")
    public BaseResp cancelOrder(@RequestBody Map map);

    @RequestMapping("/findDetailByOrderid")
    public BaseResp findDetailByOrderid(@RequestParam("orderid") String orderid);

    @RequestMapping("/findByOrderid")
    public BaseResp findByOrderid(@RequestParam("orderid") String orderid);

    @RequestMapping("/updateStatus")
    public BaseResp updateStatus(@RequestParam("orderId")String orderId,@RequestParam("status")Integer status);

    //改签方法
    @RequestMapping("/saveAndFlush")
    public BaseResp saveAndFlush(@RequestBody TgOrder tgOrder);
    //
    @RequestMapping("/delById")
    public BaseResp delById(@RequestParam("oldOrderId")String oldOrderId);

    @RequestMapping("/updateOrderId")
    public BaseResp updateOrderId(@RequestBody TgOrderDetail tgOrderDetail);

}
